//
//  Robot.m
//  GuessingGame
//
//  Created by admin on 2019/7/30.
//  Copyright © 2019 猫爷爷的酱醋茶. All rights reserved.
//

#import "Robot.h"


@implementation Robot

//机器人随机出拳
-(void)MoraAction
{
    //随机出拳
    int robotSelect = arc4random_uniform(3)+1;
    //显示随机出的拳
    NSString *select = [self MoraTypeWithNumber:robotSelect];
    NSLog(@"\n\n机器人[%@]出的拳头是:%@\n\n",_name,select);
    
    //将机器人的拳头存储在当前对象的属性中
    _select = robotSelect;
    
}

-(NSString *)MoraTypeWithNumber:(int)number
{
    switch (number) {
        case 1:
            return @"剪刀";
        case 2:
            return @"石头";
        case 3:
            return @"布";
        default:
            return @"请重新确认您要出的拳头！";
    }
    
}

@end
